package sh.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.annotation.RegEx;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 家长表(Parent)实体类
 *
 * @author makejava
 * @since 2021-05-10 12:44:08
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "家长类")
public class Parent implements Serializable {
    private static final long serialVersionUID = -20277722626658993L;
    /**
     * 家长ID
     */
    private Integer parentId;
    /**
     * 家长姓名
     */
    @ApiModelProperty(value = "家长名")
    @NotNull(message = "家长姓名不能为空")
    private String parentName;
    /**
     * 家长电话号码
     */
    @ApiModelProperty(value = "家长电话号码")
    @NotNull(message = "家长姓名不能为空")
    @Pattern(regexp = "^(0|86|17951)?(13[0-9]|15[012356789]|166|17[3678]|18[0-9]|14[57])[0-9]{8}$")
    private String parentPhone;
    /**
     * 家长性别，m是男的，w是女的
     */
    @ApiModelProperty(value = "家长性别")
    @NotNull(message = "家长性别不能为空")
    private String parentSex;
    /**
     * 家长密码
     */
    @ApiModelProperty(value = "家长登录密码")
    @NotNull(message = "家长登录密码不能为空")
    private String parentPassword;
    /**
     * 家长头像
     */
    @ApiModelProperty(value = "家长头像")
    @NotNull(message = "家长头像")
    private String parentImg;
    /**
     * 学号
     */
    @ApiModelProperty(value = "家长孩子的学号")
    @NotNull(message = "家长孩子的学号不能为空")
    private String studentCode;
    /**
     * 验证码
     */
    @ApiModelProperty(value = "注册验证码")
    @NotNull(message = "注册验证码不能为空")
    private String vertifyCode;

}
